package com.gxl.design.strategypattern.strategy;

import java.math.BigDecimal;

public class Discount implements Strategy {

    @Override
    public Double doOperation(Integer price) {
        BigDecimal b1 = new BigDecimal(Double.toString(price));
        BigDecimal b2 = new BigDecimal(Double.toString(0.85));
        Double d = b1.multiply(b2).doubleValue();
        System.out.println("折扣优惠后的价格: " + d);
        return d;
    }
}
